package com.example.token.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

//配置前缀，在配置文件中使用时前缀就是hello，如hello.redis-host
@ConfigurationProperties
public class TokenProperties {
    //命名规范必须是驼峰式，解析时会自动将大写转小写，并加-
    @Value("${hello.redis-host}")
    private String redisHost;
    @Value("${hello.redis-username}")
    private String redisUsername;
    @Value("${hello.redis-password}")
    private String redisPassword;

    public String getRedisHost() {
        return redisHost;
    }

    public void setRedisHost(String redisHost) {
        this.redisHost = redisHost;
    }

    public String getRedisUsername() {
        return redisUsername;
    }

    public void setRedisUsername(String redisUsername) {
        this.redisUsername = redisUsername;
    }

    public String getRedisPassword() {
        return redisPassword;
    }

    public void setRedisPassword(String redisPassword) {
        this.redisPassword = redisPassword;
    }
}